<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%
		java.util.List<com.group4.DAO.VideoDAO> videos = com.group4.DB.Video.getAllVideos();
		session.setAttribute("videos", videos);
%>

<t:wrapper title="Index">
	<div class="page-content">
		<div class="page-header">
			<h1>Turkish Sign Language Site</h1>
		</div>
		
		<div class="row">
			<div class="col-xs-12">
				
				<div class="widget-box transparent">
					<div class="widget-header widget-header-small">
						<h4 class="smaller">Videos</h4>
					</div>
					<div class="widget-body">
						<div class="widget-main padding-8">
							<c:forEach items="${videos}" var="video" >
								<div class="profile-activity clearfix">
									<h4><a href="videopage.jsp?v=${video.videoUrl}">${video.videoName}</a></h4>
									<div class="row">
										<div class="col-xs-6">										
											<object type="application/x-shockwave-flash" data="http://flv-player.net/medias/player_flv.swf" width="400" height="250">
											    <param name="movie" value="http://flv-player.net/medias/player_flv.swf" />
											    <param name="allowFullScreen" value="true" />
											    <param name="FlashVars" value="flv=${video.videoUrl}" />
											</object>	
										</div>
										<div class="col-xs-6">
											<h5>Description</h5>
											<p>${video.videoDescription}</p>
											<h5>Tags</h5>
											<p>${video.videoTag}</p>
										</div>
									</div>
								</div>
							</c:forEach>			
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</t:wrapper>
